import request from '@/utils/request';

export function login(data) {
  return request({
    url: 'user/login',
    method: 'post',
    data,
  });
}

export function signup(data) {
  return request({
    url: '/users',
    method: 'post',
    data,
  });
}

export function getUser(params) {
  return request({
    url: '/user/current',
    method: 'get',
    params,
  });
}

export function updateUser() {
  return request({
    url: '/user/{id}',
    method: 'PATCH',
  });
}
